home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / dev / obero / Interfaces3_4.lha / Interfaces / Rexx.mod < prev    next >
Text File  |  1994-03-05  |  23KB  |  494 lines

  1. (*
  2. (*
  3. **  Amiga Oberon Interface Module:
  4. **  $VER: Rexx.mod 40.15 (28.12.93) Oberon 3.0
  5. **
  6. **   © 1993 by Fridtjof Siebert
  7. **   updated for V40.15 by hartmut Goebel
  8. *)
  9. *)
  10.  
  11. MODULE Rexx;
  12.  
  13. IMPORT
  14.   e * := Exec,
  15.   d * := Dos,
  16.   y *:= SYSTEM;
  17.  
  18. TYPE
  19.  
  20. (* The NexxStr structure is used to maintain the internal strings in REXX.
  21.  * It includes the buffer area for the string and associated attributes.
  22.  * This is actually a variable-length structure; it is allocated for a
  23.  * specific length string, and the length is never modified thereafter
  24.  * (since it's used for recycling).
  25.  *)
  26.  
  27.   NexxStrPtr * = UNTRACED POINTER TO NexxStr;
  28.   NexxStr * = STRUCT
  29.     ivalue * : LONGINT;              (* integer value                 *)
  30.     length * : INTEGER;              (* length in bytes (excl null)   *)
  31.     flags * : SHORTSET;              (* attribute flags               *)
  32.     hash * : SHORTINT;               (* hash code                     *)
  33.     buff * : ARRAY 8 OF CHAR;        (* buffer area for strings       *)
  34.   END;                               (* size: 16 bytes (minimum)      *)
  35.  
  36. CONST
  37.  
  38.   nxAddLen * = 9;                     (* offset plus null byte *)
  39.  
  40. (* String attribute flag bit definitions                                *)
  41.   keep     * = 0;                 (* permanent string?             *)
  42.   string   * = 1;                 (* string form valid?            *)
  43.   notNum   * = 2;                 (* non-numeric?                  *)
  44.   number   * = 3;                 (* a valid number?               *)
  45.   binary   * = 4;                 (* integer value saved?          *)
  46.   float    * = 5;                 (* floating point format?        *)
  47.   ext      * = 6;                 (* an external string?           *)
  48.   source   * = 7;                 (* part of the program source?   *)
  49.  
  50. (* Combinations of flags                                                *)
  51.   intNum   * = {number, binary, string};
  52.   dpNum    * = {number, float};
  53.   alpha    * = {notNum, string};
  54.   owned    * = {source, ext,    keep};
  55.   keepStr  * = {string, source, notNum};
  56.   keepNum  * = {string, source, number, binary};
  57.  
  58. TYPE
  59.  
  60. (* The RexxArg structure is identical to the NexxStr structure, but
  61.  * is allocated from system memory rather than from internal storage.
  62.  * This structure is used for passing arguments to external programs.
  63.  * It is usually passed as an "argstring", a pointer to the string buffer.
  64.  *)
  65.  
  66.   RexxArgPtr * = UNTRACED POINTER TO RexxArg;
  67.   RexxArg * = STRUCT
  68.     size * : LONGINT;                (* total allocated length        *)
  69.     length * : INTEGER;              (* length of string              *)
  70.     flags * : SHORTSET;              (* attribute flags               *)
  71.     hash * : SHORTINT;               (* hash code                     *)
  72.     buff * : ARRAY 8 OF CHAR;        (* buffer area                   *)
  73.   END;                               (* size: 16 bytes (minimum)      *)
  74.  
  75. (* The RexxMsg structure is used for all communications with REXX
  76.  * programs.  It is an EXEC message with a parameter block appended.
  77.  *)
  78.  
  79.   RexxMsgPtr * = UNTRACED POINTER TO RexxMsg;
  80.   RexxMsg * = STRUCT (node * : e.Message) (* EXEC message structure  *)
  81.     taskBlock : e.APTR;            (* global structure (private)    *)
  82.     libBase   : e.LibraryPtr;      (* library base (private)        *)
  83.     action   *: LONGINT;           (* command (action) code *)
  84.     result1  *: e.APTR;            (* primary result (return code)  *)
  85.     result2  *: e.APTR;            (* secondary result              *)
  86.     args  *: ARRAY 16 OF e.LSTRPTR;(* argument block (ARG0-ARG15)   *)
  87.  
  88.     passPort *: e.MsgPortPtr;      (* forwarding port               *)
  89.     commAddr *: e.LSTRPTR;         (* host address (port name)      *)
  90.     fileExt  *: e.LSTRPTR;         (* file extension                *)
  91.     stdin    *: d.FileHandlePtr;   (* input stream (filehandle)     *)
  92.     stdout   *: d.FileHandlePtr;   (* output stream (filehandle)    *)
  93.     avail    *: LONGINT;           (* future expansion              *)
  94.   END;                             (* size: 128 bytes               *)
  95.  
  96. CONST
  97.  
  98.   maxRMArg * = 15;                  (* maximum arguments             *)
  99.  
  100. (* Command (action) codes for message packets                        *)
  101.   rxComm     * = 001000000H;        (* a command-level invocation    *)
  102.   rxFunc     * = 002000000H;        (* a function call               *)
  103.   rxClose    * = 003000000H;        (* close the REXX server         *)
  104.   rxQuery    * = 004000000H;        (* query for information         *)
  105.   rxAddFH    * = 007000000H;        (* add a function host           *)
  106.   rxAddLib   * = 008000000H;        (* add a function library        *)
  107.   rxRemLib   * = 009000000H;        (* remove a function library     *)
  108.   rxAddCon   * = 00A000000H;        (* add/update a ClipList string  *)
  109.   rxRemCon   * = 00B000000H;        (* remove a ClipList string      *)
  110.   rxTCOpn    * = 00C000000H;        (* open the trace console        *)
  111.   rxTCCls    * = 00D000000H;        (* close the trace console       *)
  112.  
  113. (* Command modifier flag bits                                        *)
  114.   rxNoIO     * = 000010000H;        (* suppress I/O inheritance?     *)
  115.   rxResult   * = 000020000H;        (* result string expected?       *)
  116.   rxString   * = 000040000H;        (* program is a "string file"?   *)
  117.   rxToken    * = 000080000H;        (* tokenize the command line?    *)
  118.   rxNonRet   * = 000100000H;        (* a "no-return" message?        *)
  119.  
  120.   rxfNoIO    * = 16;                (* suppress I/O inheritance?     *)
  121.   rxfResult  * = 17;                (* result string expected?       *)
  122.   rxfString  * = 18;                (* program is a "string file"?   *)
  123.   rxfToken   * = 19;                (* tokenize the command line?    *)
  124.   rxfNonRet  * = 20;                (* a "no-return" message?        *)
  125.  
  126.   rxCodeMask * = 0FF000000H;
  127.   rxArgMask  * = 00000000FH;
  128.  
  129. PROCEDURE ActionCode * (action{0}: LONGINT): LONGINT;
  130. (*
  131.  * Filter Command code out of RexxMsg.action. Result will be one of rxComm,
  132.  * rxFunc,...
  133.  *)
  134. BEGIN
  135.   RETURN y.VAL(LONGINT,y.VAL(LONGSET,action) * y.VAL(LONGSET,rxCodeMask));
  136. END ActionCode;
  137.  
  138.  
  139. PROCEDURE ActionFlags * (action{0}: LONGINT): LONGSET;
  140. (*
  141.  * Filter Command modifier flag bit out of RexxMsg.action. Result will be a set of
  142.  * rxfNoIO, rxfResult, ...
  143.  *)
  144. BEGIN RETURN y.VAL(LONGSET,action) * LONGSET{16..23}; END ActionFlags;
  145.  
  146.  
  147. PROCEDURE ActionArg * (action{0}: LONGINT): LONGINT;
  148. (*
  149.  * Filter Arg out of RexxMsg.action.
  150.  *)
  151. BEGIN RETURN action MOD 16; END ActionArg;
  152.  
  153.  
  154. TYPE
  155. (* The RexxRsrc structure is used to manage global resources.  Each node
  156.  * has a name string created as a RexxArg structure, and the total size
  157.  * of the node is saved in the "rr_Size" field.  The REXX systems library
  158.  * provides functions to allocate and release resource nodes.  If special
  159.  * deletion operations are required, an offset and base can be provided in
  160.  * "rr_Func" and "rr_Base", respectively.  This "autodelete" function will
  161.  * be called with the base in register A6 and the node in A0.
  162.  *)
  163.  
  164.   RexxRsrcPtr * = UNTRACED POINTER TO RexxRsrc;
  165.   RexxRsrc * = STRUCT (node * : e.Node)
  166.     func * : INTEGER;                   (* "auto-delete" offset          *)
  167.     base * : e.APTR;                    (* "auto-delete" base            *)
  168.     size * : LONGINT;                   (* total size of node            *)
  169.     arg1 * : e.APTR;                    (* available ...         *)
  170.     arg2 * : e.APTR;                    (* available ...         *)
  171.   END;                                  (* size: 32 bytes                *)
  172.  
  173. CONST
  174.  
  175. (* Resource node types                                                  *)
  176.   any      * = 0;                 (* any node type ...             *)
  177.   lib      * = 1;                 (* a function library            *)
  178.   port     * = 2;                 (* a public port         *)
  179.   file     * = 3;                 (* a file IoBuff         *)
  180.   host     * = 4;                 (* a function host               *)
  181.   clip     * = 5;                 (* a Clip List node              *)
  182.  
  183. (* The RexxTask structure holds the fields used by REXX to communicate with
  184.  * external processes, including the client task.  It includes the global
  185.  * data structure (and the base environment).  The structure is passed to
  186.  * the newly-created task in its "wake-up" message.
  187.  *)
  188.  
  189.   globalSz * = 200;               (* total size of GlobalData      *)
  190.  
  191. TYPE
  192.  
  193.   RexxTaskPtr * = UNTRACED POINTER TO RexxTask;
  194.   RexxTask * = STRUCT
  195.     global * : ARRAY globalSz OF e.BYTE;(* global data structure *)
  196.     msgPort * : e.MsgPort;              (* global message port           *)
  197.     flags * : SHORTSET;                 (* task flag bits                *)
  198.     sigBit * : SHORTINT;                (* signal bit                    *)
  199.  
  200.     clientID * : e.APTR;                (* the client's task ID          *)
  201.     msgPkt * : e.APTR;                  (* the packet being processed    *)
  202.     taskID * : e.APTR;                  (* our task ID                   *)
  203.     rexxPort * : e.APTR;                (* the REXX public port          *)
  204.  
  205.     errTrap * : e.APTR;                 (* Error trap address            *)
  206.     stackPtr * : e.APTR;                (* stack pointer for traps       *)
  207.  
  208.     header1 * : e.List;                 (* Environment list              *)
  209.     header2 * : e.List;                 (* Memory freelist               *)
  210.     header3 * : e.List;                 (* Memory allocation list        *)
  211.     header4 * : e.List;                 (* Files list                    *)
  212.     header5 * : e.List;                 (* Message Ports List            *)
  213.   END;
  214.  
  215. CONST
  216.  
  217. (* Definitions for RexxTask flag bits                                   *)
  218.   trace   * = 0;                 (* external trace flag           *)
  219.   halt    * = 1;                 (* external halt flag            *)
  220.   susp    * = 2;                 (* suspend task?         *)
  221.   tCUse   * = 3;                 (* trace console in use? *)
  222.   wait    * = 6;                 (* waiting for reply?            *)
  223.   close   * = 7;                 (* task completed?               *)
  224.  
  225. (* Definitions for memory allocation constants                          *)
  226.   memQuant * = 16;                  (* quantum of memory space       *)
  227.   memMask  * = 0FFFFFFF0H;          (* mask for rounding the size    *)
  228.  
  229.   memQuick * = LONGSET{0};          (* EXEC flags: MEMF_PUBLIC       *)
  230.   memClear * = LONGSET{16};         (* EXEC flags: MEMF_CLEAR        *)
  231.  
  232. TYPE
  233.  
  234. (* The SrcNode is a temporary structure used to hold values destined for
  235.  * a segment array.  It is also used to maintain the memory freelist.
  236.  *)
  237.  
  238.   SrcNodePtr * = UNTRACED POINTER TO SrcNode;
  239.   SrcNode * = STRUCT
  240.     succ * : SrcNodePtr;            (* next node                     *)
  241.     pred * : SrcNodePtr;            (* previous node                 *)
  242.     ptr * : e.APTR;                 (* pointer value                 *)
  243.     size * : LONGINT;               (* size of object                *)
  244.   END;                              (* size: 16 bytes                *)
  245.  
  246. CONST
  247.   rxBuffSz * = 204;                 (* buffer length         *)
  248.  
  249. TYPE
  250.  
  251. (*
  252.  * The IoBuff is a resource node used to maintain the File List.  Nodes
  253.  * are allocated and linked into the list whenever a file is opened.
  254.  *)
  255.  
  256.   IoBuffPtr * = UNTRACED POINTER TO IoBuff;
  257.   IoBuff * = STRUCT (node * : RexxRsrc) (* structure for files/strings   *)
  258.     rpt * : e.APTR;                     (* read/write pointer            *)
  259.     rct * : LONGINT;                    (* character count               *)
  260.     dFH * : d.FileHandlePtr;            (* DOS filehandle                *)
  261.     lock * : d.FileLockPtr;             (* DOS lock                      *)
  262.     bct * : LONGINT;                    (* buffer length         *)
  263.     area * : ARRAY rxBuffSz OF e.BYTE;  (* buffer area                   *)
  264.   END;                                  (* size: 256 bytes               *)
  265.  
  266. CONST
  267.  
  268. (* Access mode definitions                                              *)
  269.   ioExists  * = -1;                (* an external filehandle        *)
  270.   ioStrF    * = 0;                 (* a "string file"               *)
  271.   ioRead    * = 1;                 (* read-only access              *)
  272.   ioWrite   * = 2;                 (* write mode                    *)
  273.   ioAppend  * = 3;                 (* append mode (existing file)   *)
  274.  
  275. (*
  276.  * Offset anchors for SeekF()
  277.  *)
  278.   ioBegin * = -1;     (* relative to start             *)
  279.   ioCurr  * = 0;      (* relative to current position  *)
  280.   ioEnd   * = 1;      (* relative to end               *)
  281.  
  282. TYPE
  283.  
  284. (*
  285.  * A message port structure, maintained as a resource node.  The ReplyList
  286.  * holds packets that have been received but haven't been replied.
  287.  *)
  288.  
  289.   RexxMsgPortPtr * = UNTRACED POINTER TO RexxMsgPort;
  290.   RexxMsgPort * = STRUCT (node * : RexxRsrc) (* linkage node   *)
  291.     port * : e.MsgPort;       (* the message port              *)
  292.     replyList * : e.List;     (* messages awaiting reply       *)
  293.   END;
  294.  
  295. CONST
  296.  
  297. (*
  298.  * DOS Device types
  299.  *)
  300.   dtDev * = 0;                (* a device                      *)
  301.   dtDir * = 1;                (* an ASSIGNed directory         *)
  302.   dtVol * = 2;                (* a volume                      *)
  303.  
  304. (*
  305.  * Private DOS packet types
  306.  *)
  307.   actionStack = 2002;         (* stack a line                  *)
  308.   actionQueue = 2003;         (* queue a line                  *)
  309.  
  310. (* Errors: *)
  311.  
  312.   errcMsg  * = 0;             (*  error code offset           *)
  313.   err10001 * = errcMsg+1;     (*  program not found           *)
  314.   err10002 * = errcMsg+2;     (*  execution halted            *)
  315.   err10003 * = errcMsg+3;     (*  no memory available         *)
  316.   err10004 * = errcMsg+4;     (*  invalid character in program*)
  317.   err10005 * = errcMsg+5;     (*  unmatched quote             *)
  318.   err10006 * = errcMsg+6;     (*  unterminated comment        *)
  319.   err10007 * = errcMsg+7;     (*  clause too long             *)
  320.   err10008 * = errcMsg+8;     (*  unrecognized token          *)
  321.   err10009 * = errcMsg+9;     (*  symbol or string too long   *)
  322.  
  323.   err10010 * = errcMsg+10;    (*  invalid message packet      *)
  324.   err10011 * = errcMsg+11;    (*  command string error        *)
  325.   err10012 * = errcMsg+12;    (*  error return from function  *)
  326.   err10013 * = errcMsg+13;    (*  host environment not found  *)
  327.   err10014 * = errcMsg+14;    (*  required library not found  *)
  328.   err10015 * = errcMsg+15;    (*  function not found          *)
  329.   err10016 * = errcMsg+16;    (*  no return value             *)
  330.   err10017 * = errcMsg+17;    (*  wrong number of arguments   *)
  331.   err10018 * = errcMsg+18;    (*  invalid argument to function*)
  332.   err10019 * = errcMsg+19;    (*  invalid PROCEDURE           *)
  333.  
  334.   err10020 * = errcMsg+20;    (*  unexpected THEN/ELSE        *)
  335.   err10021 * = errcMsg+21;    (*  unexpected WHEN/OTHERWISE   *)
  336.   err10022 * = errcMsg+22;    (*  unexpected LEAVE or ITERATE *)
  337.   err10023 * = errcMsg+23;    (*  invalid statement in SELECT *)
  338.   err10024 * = errcMsg+24;    (*  missing THEN clauses        *)
  339.   err10025 * = errcMsg+25;    (*  missing OTHERWISE           *)
  340.   err10026 * = errcMsg+26;    (*  missing or unexpected END   *)
  341.   err10027 * = errcMsg+27;    (*  symbol mismatch on END      *)
  342.   err10028 * = errcMsg+28;    (*  invalid DO syntax           *)
  343.   err10029 * = errcMsg+29;    (*  incomplete DO/IF/SELECT     *)
  344.  
  345.   err10030 * = errcMsg+30;    (*  label not found             *)
  346.   err10031 * = errcMsg+31;    (*  symbol expected             *)
  347.   err10032 * = errcMsg+32;    (*  string or symbol expected   *)
  348.   err10033 * = errcMsg+33;    (*  invalid sub-keyword         *)
  349.   err10034 * = errcMsg+34;    (*  required keyword missing    *)
  350.   err10035 * = errcMsg+35;    (*  extraneous characters       *)
  351.   err10036 * = errcMsg+36;    (*  sub-keyword conflict        *)
  352.   err10037 * = errcMsg+37;    (*  invalid template            *)
  353.   err10038 * = errcMsg+38;    (*  invalid TRACE request       *)
  354.   err10039 * = errcMsg+39;    (*  uninitialized variable      *)
  355.  
  356.   err10040 * = errcMsg+40;    (*  invalid variable name       *)
  357.   err10041 * = errcMsg+41;    (*  invalid expression          *)
  358.   err10042 * = errcMsg+42;    (*  unbalanced parentheses      *)
  359.   err10043 * = errcMsg+43;    (*  nesting level exceeded      *)
  360.   err10044 * = errcMsg+44;    (*  invalid expression result   *)
  361.   err10045 * = errcMsg+45;    (*  expression required         *)
  362.   err10046 * = errcMsg+46;    (*  boolean value not 0 or 1    *)
  363.   err10047 * = errcMsg+47;    (*  arithmetic conversion error *)
  364.   err10048 * = errcMsg+48;    (*  invalid operand             *)
  365.  
  366. (*
  367.  * Return Codes for general use
  368.  *)
  369.   ok    * = 0;                (*  success                     *)
  370.   warn  * = 5;                (*  warning only                *)
  371.   error * = 10;               (*  something's wrong           *)
  372.   fatal * = 20;               (*  complete or severe failure  *)
  373.  
  374.  
  375.   rxsName * = "rexxsyslib.library";
  376.   rxsDir * = "REXX";
  377.   rxsTName * = "ARexx";
  378.  
  379. TYPE
  380.  
  381. (* The REXX systems library structure.  This should be considered as    *)
  382. (* semi-private and read-only, except for documented exceptions.        *)
  383.  
  384.   RxsLibPtr * = UNTRACED POINTER TO RxsLib;
  385.   RxsLib * = STRUCT (node * : e.Library) (* EXEC library node             *)
  386.     flags * : SHORTSET;                  (* global flags                  *)
  387.     shadow * : SHORTSET;                 (* shadow flags                  *)
  388.     sysBase * : e.LibraryPtr;            (* EXEC library base             *)
  389.     dosBase * : d.DosLibraryPtr;         (* DOS library base              *)
  390.     ieeeDPBase * : e.LibraryPtr;         (* IEEE DP math library base     *)
  391.     segList * : e.BPTR;                  (* library seglist               *)
  392.     nil * : d.FileHandlePtr;             (* global NIL: filehandle        *)
  393.     chunk * : LONGINT;                   (* allocation quantum            *)
  394.     maxNest * : LONGINT;                 (* maximum expression nesting    *)
  395.     null * : NexxStrPtr;                 (* static string: NULL           *)
  396.     false * : NexxStrPtr;                (* static string: FALSE          *)
  397.     true * : NexxStrPtr;                 (* static string: TRUE           *)
  398.     rexx * : NexxStrPtr;                 (* static string: REXX           *)
  399.     command * : NexxStrPtr;              (* static string: COMMAND        *)
  400.     stdin * : NexxStrPtr;                (* static string: STDIN          *)
  401.     stdout * : NexxStrPtr;               (* static string: STDOUT *)
  402.     stderr * : NexxStrPtr;               (* static string: STDERR *)
  403.     version * : e.LSTRPTR;               (* version string                *)
  404.  
  405.     taskName * : e.LSTRPTR;              (* name string for tasks *)
  406.     taskPri * : LONGINT;                 (* starting priority             *)
  407.     taskSeg * : e.BPTR;                  (* startup seglist               *)
  408.     stackSize * : LONGINT;               (* stack size                    *)
  409.     rexxDir * : e.LSTRPTR;               (* REXX directory                *)
  410.     cTABLE * : e.LSTRPTR;                (* character attribute table     *)
  411.     notice * : e.LSTRPTR;                (* copyright notice              *)
  412.  
  413.     rexxPort * : e.MsgPort;              (* REXX public port              *)
  414.     readLock* : INTEGER;                 (* lock count                    *)
  415.     traceFH * : d.FileHandlePtr;         (* global trace console          *)
  416.     taskList * : e.List;                 (* REXX task list                *)
  417.     numTask * : INTEGER;                 (* task count                    *)
  418.     libList * : e.List;                  (* Library List header           *)
  419.     numLib * : INTEGER;                  (* library count         *)
  420.     clipList * : e.List;                 (* ClipList header               *)
  421.     numClip * : INTEGER;                 (* clip node count               *)
  422.     msgList * : e.List;                  (* pending messages              *)
  423.     numMsg * : INTEGER;                  (* pending count         *)
  424.     pgmList * : e.List;                  (* cached programs               *)
  425.     numPgm * : INTEGER;                  (* program count         *)
  426.  
  427.     traceCnt * : INTEGER;                (* usage count for trace console *)
  428.     avail * : INTEGER;
  429.   END;
  430.  
  431. CONST
  432.  
  433. (* Global flag bit definitions for RexxMaster                           *)
  434. (*trace * = trace; *)              (* interactive tracing?          *)
  435. (*halt  * = halt;  *)              (* halt execution?               *)
  436. (*susp  * = susp;  *)              (* suspend execution?            *)
  437.   stop  * = 6;                     (* deny further invocations      *)
  438. (*close * = 7;     *)              (* close the master              *)
  439.  
  440.   rlfMask * = SHORTSET{trace,halt,susp};
  441.  
  442. (* Initialization constants                                             *)
  443.   rxsChunk  * = 1024;        (* allocation quantum            *)
  444.   rxsNest   * = 32;          (* expression nesting limit      *)
  445.   rxsTPri   * = 0;           (* task priority         *)
  446.   rxsStack  * = 4096;        (* stack size                    *)
  447.  
  448. (* Character attribute flag bits used in REXX.                          *)
  449.   ctSpace   * = 0;                  (* white space characters        *)
  450.   ctDigig   * = 1;                  (* decimal digits 0-9            *)
  451.   ctAlpha   * = 2;                  (* alphabetic characters *)
  452.   ctRrxxSym * = 3;                  (* REXX symbol characters        *)
  453.   ctRexxOpr * = 4;                  (* REXX operator characters      *)
  454.   ctRexxSpc * = 5;                  (* REXX special symbols          *)
  455.   ctUpper   * = 6;                  (* UPPERCASE alphabetic          *)
  456.   ctLower   * = 7;                  (* lowercase alphabetic          *)
  457.  
  458.  
  459. PROCEDURE IVALUE * (nsPtr{8} : NexxStrPtr): LONGINT;
  460. BEGIN RETURN nsPtr.ivalue END IVALUE;
  461.  
  462. (* Field definitions                                                    *)
  463.  
  464. PROCEDURE ARG0 * (rmp{8}: RexxMsgPtr): e.APTR; (* start of argblock             *)
  465. BEGIN RETURN rmp.args[0] END ARG0;
  466.  
  467. PROCEDURE ARG1 * (rmp{8}: RexxMsgPtr): e.APTR; (* first argument                *)
  468. BEGIN RETURN rmp.args[1] END ARG1;
  469.  
  470. PROCEDURE ARG2 * (rmp{8}: RexxMsgPtr): e.APTR; (* second argument               *)
  471. BEGIN RETURN rmp.args[2] END ARG2;
  472.  
  473.  
  474.  
  475. (* The Library List contains just plain resource nodes.         *)
  476.  
  477. PROCEDURE LLOFFSET * (rrp{8}: RexxRsrcPtr): LONGINT;  (* "Query" offset     *)
  478. BEGIN RETURN y.VAL(LONGINT,rrp.arg1) END LLOFFSET;
  479.  
  480. PROCEDURE LLVERS * (rrp{8}: RexxRsrcPtr): LONGINT;    (* library version    *)
  481. BEGIN RETURN y.VAL(LONGINT,rrp.arg2) END LLVERS;
  482.  
  483. (*
  484.  * The RexxClipNode structure is used to maintain the Clip List.  The value
  485.  * string is stored as an argstring in the rr_Arg1 field.
  486.  *)
  487. PROCEDURE CLVALUE * (rrp{8}: RexxRsrcPtr): e.LSTRPTR;
  488. BEGIN RETURN rrp.arg1 END CLVALUE;
  489.  
  490.  
  491. END Rexx.
  492.  
  493.  
  494.